package com.ruoyi.manage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.manage.mapper.StaffAttConfigMapper;
import com.ruoyi.manage.domain.StaffAttConfig;
import com.ruoyi.manage.service.IStaffAttConfigService;

/**
 * 员工考核配置Service业务层处理
 * 
 * @author cf
 * @date 2025-06-04
 */
@Service
public class StaffAttConfigServiceImpl implements IStaffAttConfigService 
{
    @Autowired
    private StaffAttConfigMapper staffAttConfigMapper;

    /**
     * 查询员工考核配置
     * 
     * @param id 员工考核配置主键
     * @return 员工考核配置
     */
    @Override
    public StaffAttConfig selectStaffAttConfigById(Long id)
    {
        return staffAttConfigMapper.selectStaffAttConfigById(id);
    }

    /**
     * 查询员工考核配置列表
     * 
     * @param staffAttConfig 员工考核配置
     * @return 员工考核配置
     */
    @Override
    public List<StaffAttConfig> selectStaffAttConfigList(StaffAttConfig staffAttConfig)
    {
        return staffAttConfigMapper.selectStaffAttConfigList(staffAttConfig);
    }

    /**
     * 新增员工考核配置
     * 
     * @param staffAttConfig 员工考核配置
     * @return 结果
     */
    @Override
    public int insertStaffAttConfig(StaffAttConfig staffAttConfig)
    {
        staffAttConfig.setCreateTime(DateUtils.getNowDate());
        return staffAttConfigMapper.insertStaffAttConfig(staffAttConfig);
    }

    /**
     * 修改员工考核配置
     * 
     * @param staffAttConfig 员工考核配置
     * @return 结果
     */
    @Override
    public int updateStaffAttConfig(StaffAttConfig staffAttConfig)
    {
        staffAttConfig.setUpdateTime(DateUtils.getNowDate());
        return staffAttConfigMapper.updateStaffAttConfig(staffAttConfig);
    }

    /**
     * 批量删除员工考核配置
     * 
     * @param ids 需要删除的员工考核配置主键
     * @return 结果
     */
    @Override
    public int deleteStaffAttConfigByIds(Long[] ids)
    {
        return staffAttConfigMapper.deleteStaffAttConfigByIds(ids);
    }

    /**
     * 删除员工考核配置信息
     * 
     * @param id 员工考核配置主键
     * @return 结果
     */
    @Override
    public int deleteStaffAttConfigById(Long id)
    {
        return staffAttConfigMapper.deleteStaffAttConfigById(id);
    }
}
